import service from '@/utils/request'

const DepartApi = {
  addDepart: function(data) {
    return service.post('depart', data)
  },
  editDepart(data) {
    return service.put('depart', data)
  },
  updateDepartState(data) {
    return service.put('depart/updateState', data)
  },
  deleteDepart(data) {
    return service.delete('depart', {params: data })
  },
  listDeparts(data) {
    return service.get('depart/treeDepart', {params: data })
  },
  getDepartInfo(data) {
    return service.get('depart/index', {params: data })
  },

  // DepartMangenebt
  listDepart(data) {
    return service.get('depart/listDepart',{params: data});
  },
  getMainBusiness(data){
    return service.get("departBusiness/getMainBusiness",{params:data})
  },
  setMainBusiness(data){
    return service.post("departBusiness/setMainBusiness",data)
  },
  setDepartBusiness(data){
    return service.post("departBusiness/setDepartBusiness",data)
  },

}

export default DepartApi
